#pragma once


namespace QBCatalogue
{
//size
static const usize s_nPrimaryMenuHeight = 32;
static const usize s_nPrimaryMenuWidth = 120;
static const usize s_nPrimaryMenuNameHeight = 17;
static const usize s_nButtonHeight = 30;
static const usize s_nButtonWidth = 140;
static const usize s_nLineHeight = 30;
static const int s_nWidthGap = 20;
static const int s_nHeightGap = 20;
static const usize s_nNameToItemGap = 10;
static const usize s_nPage2PageDistance = 20;
static const usize s_nCatalogueTitleWidthInterval = 4;
static const usize s_nCatalogueTitleHeightInterval = 1;
static const usize s_nXGap = 3;
static const usize s_nSeparatorWidth = 2;
static const usize s_nSeparatorHeight = 12;
static const usize s_nTitleGap = 14;
static const usize s_nTitleNameGap = 10;
static const usize s_nTitleHeight = 40;
static const usize s_nTitleWidth = 123;
static const usize s_nTriangleGap = 8; 
static const usize s_nAbbrGap = 6;
static const usize s_nButtonPrefixGap = 5;
static const usize s_nPanelNameTop = 4;
static const usize s_nButtonGap = 12;
static const usize s_nPanelGap = 16;

//弃用
static const COLORREF s_clrCatalogueBack = 0x4A4817;
static const COLORREF s_clrCatalogueTitleBack = 0x24240E;
//color
static const COLORREF s_clrHoverBack = 0x474F1A;
static const COLORREF s_clrMenuHoverBack = 0x24290C;
static const COLORREF s_clrHeadText = 0x52C1F9;
static const COLORREF s_clrText = 0xC8EBFF;
static const COLORREF s_clrTitleBack = 0x222417;
static const COLORREF s_clrTitleHover = 0x373D19;
static const COLORREF s_clrTitleSelect = 0x0093FF;
static const COLORREF s_clrTitleNormal = 0x52C1F9;
static const COLORREF s_clrTitleNewHover = 0x000000;
static const COLORREF s_clrPanelBack = 0x2F321E;
static const COLORREF s_clrAbbr = 0x818C45;
static const COLORREF s_clrShadow = 0x768330;


enum ECataloguePage
{
	//页面的名字一旦确定就不要修改了，WEB页面可能使用到这些名字
	Catalogue_Non = 0,
	//----------------------------------------------------------------
	//一级目录
	CatalogueTitle_Start = 10000,
	CatalogueTitle_Bond = 10001,			//债券
	CatalogueTitle_Money = 10002,			//资金
	CatalogueTitle_Future = 10003,			//期货
	CatalogueTitle_Information = 10004,		//资讯
	CatalogueTitle_MyQb = 10005,			//我的QB
	CatalogueTitle_IAS = 10006,				//IAS
	CatalogueTitle_Other = 10007,			//其他
	CatalogueTitle_Derivatives=10008,		//衍生品

	CatalgoueTitle_PrimaryPage = 10009,    //旗舰店
	CatalogueTitle_FX = 10010,				//汇率

	CatalogueTitle_VirtualContainer = 10998,			//虚拟tab,用来保存不显示的但是又能打开的页面
	CatalogueTitle_MAX = 10999,
	//----------------------------------------------------------------
	//二级目录
	CatalogueSecondTitle_Start = 11000,
	CatalogueSecondTitle_Quotations = 11001,		//行情报价
	CatalogueSecondTitle_PrimaryMarket = 11002,		//一级市场
	CatalogueSecondTitle_DiagnosticTool = 11003,	//分析工具
	CatalogueSecondTitle_DataInfo = 11004,			//研究资讯
	CatalogueSecondTitle_MyQb = 11005,				//我的QB
	CatalogueSecondTitle_PrimaryLeaderShip = 11006,	//一级-旗舰店
	CatalogueSecondTitle_Common = 11007,			//常用功能
	CatalogueSecondTitle_MyBackground = 11008,		//我的后台
	CatalogueSecondTitle_MyIAS	= 11009,			//我的ias
	CatalogueSecondTitle_PrimaryPage = 11010,		//一级旗舰店
	CatalogueSecondTitle_InterestRate = 11011,			//利率
	CatalogueSecondTitle_FX = 11012,						//外汇
	CatalogueSecondTitle_OtherLeaderShip = 11013,	//其他-旗舰店
	CatalogueSecondTitle_OptionLeaderShip = 11014,	//期货-旗舰店
	//new catalogue
	CatalogueSecondTitle_SingleBond = 11015,		//债券-单券
	CatalogueSecondTitle_Offering = 11016,			//货币-发行
	CatalogueSecondTitle_FutureSingle = 11017,		//期货-单券
	CatalogueSecondTitle_RateAnalysis = 11018,		//利率-分析
	CatalogueSecondTitle_FXQuote = 11019,			//汇率-行情
	CatalogueSecondTitle_FXNews = 11020,			//汇率-资讯
	CatalogueSecondTitle_ABSSingle = 11021,			//资产支持证券_单券
	CatalogueSecondTitle_ABSAnalysis = 11022,		//资产支持证券_分析

	CatalogueSecondTitle_Primary_FinancialInstitution = 11023, //旗舰店-银行
	CatalogueSecondTitle_Primary_Dealer = 11024,			//旗舰店-券商
	CatalogueSecondTitle_Primary_Broker = 11025,			//旗舰店-补足
	CatalogueSecondTitle_FutureData = 11026,				//期货-数据

	CatalogueSecondTitle_ABSQuote = 11027,				//资产支持证券-行情

	CatalogueSecondTitle_MAX,
	//----------------------------------------------------------------
	//页面ID放在此处
	CataloguePage_Start = 20000,
	//固定收益目录
	CataloguePage_BrokerBonds = 20001,					//经纪商现券
	CataloguePage_BrokerBestPrice = 20002,				//最优报价
	CataloguePage_ExchangesBonds = 20003,				//交易所行情
	CataloguePage_InterBankPrice = 20004,				//同业报价
	CataloguePage_NewBonds = 20005,						//超级新债通
	CataloguePage_IssueStatistics = 20006,				//发行统计
	CataloguePage_TradeStatistics = 20007,				//旧版成交统计
	CataloguePage_HoldingPeriodReturn = 20008,			//持有期计算器
	CataloguePage_Overview = 20009,						//综合分析
	CataloguePage_Leverage = 20010,						//融资杠杆
	//CataloguePage_RepurchaseCalculator = 20011,		//回购计算器
	CataloguePage_BondCalendar = 20012,					//债券日历
	CataloguePage_BrokerReview = 20013,					//经纪商日评
	CataloguePage_MacroEconomy = 20014,					//宏观经济
	CataloguePage_BenchmarkRate = 20015,				//基准利率
	CataloguePage_MyPurchase = 20016,					//我的申购
	CataloguePage_TreasuryFutures = 20017,				//国债期货
	CataloguePage_TreasuryFutureDetail = 20018,			//国债期货分时
	CataloguePage_InterestRateSwaps = 20019,			//利率互换
	CataloguePage_ForeignExchangeDerivatives = 20020,	//外汇衍生品
	CataloguePage_InterestRateSwapsCalculator = 20021,	//利率互换计算器
	CataloguePage_CtdCalculator = 20022,				//CTD分析
	CataloguePage_SpreadAnalysis = 20023,				//历史价差
	CataloguePage_IrsBondSpread = 20024,				//IRS现券套利
	//CataloguePage_MoneyMarket = 20028,					//货币市场
	CataloguePage_SecondaryBond = 20030,				//机构债券二级
	CataloguePage_BondDetail = 20031,					//债券详情
	CataloguePage_OnlinePurchase = 20032,				//在线申购
	CataloguePage_Cdb = 20033,							//国开资金
	CataloguePage_EcpicInvestLimit = 20034,				//投资限制(太平洋保险)
	CataloguePage_TradeStatistics_New = 20035,			//成交统计
    CataloguePage_MMBondQuote = 20036,					//债券报价
	CataloguePage_IAS = 20037,							//IAS
	CataloguePage_NewsAndInformation = 20038,			//新闻资讯
	CataloguePage_ContinueContract = 20039,				//连续合约
	CataloguePage_WebPage = 20040,						//qbbrowser 网页
	CataloguePage_InterBankPriceOffline = 20041,		//线下同业
	//CataloguePage_BasisBreakevenAnalysis = 20042,		//基差盈亏
	CataloguePage_BadNews = 20043,						//负面新闻
	CataloguePage_HomePage = 20044,						//首页
	//CataloguePage_ExchangeSpot = 20045,				//外汇即期
	CataloguePage_EconomicCalendar = 20046,				//财经日历
	CataloguePage_SpreadIndex = 20047,					//光大利差
	CataloguePage_MyDaily = 20048,						//我的日报
	CataloguePage_ExchangesRepo = 20049,				//交易所回购
	CataloguePage_MyPurchaseOld = 20050,				//我的申购旧版
	CataloguePage_WebSpreadAnalysis = 20051,			//利差分析
	CataloguePage_MyAttention = 20052,					//我的关注
	//CataloguePage_Dimsum_Web_Bochk_DimSum = 20053,				//中银香港
	CataloguePage_NGPC = 20054,							//利率招标室
	CataloguePage_NGPC_Sale = 20055,					//利率招标室销售
	CataloguePage_TodaySpread = 20056,                  //当日价差
	CataloguePage_NGPC_Corp = 20057,					//公司债
	CataloguePage_NGPC_PPN = 20058,						//ngpc PPN
	//CataloguePage_Cnex = 20059,							//Cnex资金情绪, 资金面指数 <----资金面指数，CNEX，deleted by lance 20181130
	CataloguePage_CFETS_MM = 20060,						//CFETS货币市场, CFETS货币
	CataloguePage_WebBondDetail_Profile = 20061,		//web债券详情，深度资料
	CataloguePage_X_Swaps = 20062,			            //X-SWAP页面
	CataloguePage_CFETSQUOTE = 20063,		            //CFETS行情
	CataloguePage_MyAttentionPlus = 20064,				//我的关注PLUS
	CataloguePage_IDCClient = 20065,					//IDCClient
	CataloguePage_SSEFI = 20066,						//上证固收平台
	CataloguePage_FixedIncomeMarketOverview = 20067,	//固收综合屏
	CataloguePage_Choice = 20068,						//按键精灵精选
	CataloguePage_WebOSMBond_Profile = 20069,			//web中资美元债债券详情
	CataloguePage_TFStatistics = 20070,					//TF统计
	CataloguePage_ABSQuote = 20071,					//ABS报价
	CataloguePage_NewQM		= 20072,				//新版QM
	CataloguePage_RtSpread  = 20073,				//实时利差
	CataloguePage_BondBrowser = 20074,				//债券浏览器
	
	//一级旗舰店
	CataloguePage_PrimaryMarket_Start = 30000,
	CataloguePage_PrimaryMarket_Swhysc = 30001,			//申万宏源
	CataloguePage_PrimaryMarket_PingAn = 30002,			//平安证券
	CataloguePage_PrimaryMarket_Tpsitico = 30003,		//国利货币
	CataloguePage_PrimaryMarket_LianXunSec = 30004,		//联讯证券
	CataloguePage_PrimaryMarket_Cmbc = 30005,			//民生银行
	CataloguePage_PrimaryMarket_Ccb = 30006,			//建设银行
	CataloguePage_PrimaryMarket_Bjrcb = 30007,			//北京农商行
	CataloguePage_PrimaryMarket_Cdb = 30008,			//国家开发银行
	CataloguePage_PrimaryMarket_Nbcb = 30009,			//宁波银行
	CataloguePage_PrimaryMarket_Cms = 30010,			//招商证券

	CataloguePage_PrimaryMarket_Web = 30300,			//网页版旗舰店
	CataloguePage_PrimaryMarket_End,					//CataloguePage_PrimaryMarket_Start	

	//一级指标
	CataloguePage_PrimaryMarketBackGround_Start = 31000,
	CataloguePage_PrimaryMarketBackGround_PingAn = 31001,	//平安指标
	CataloguePage_PrimaryMarketBackGround_Cmbc = 31002,		//民生指标
	CataloguePage_PrimaryMarketBackGround_Bjrcb = 31003,	//北京农商行
	CataloguePage_PrimaryMarketBackGround_Cdb = 31004,		//国家开发银行后台
	CataloguePage_PrimaryMarketBackGround_End,				//CataloguePage_PrimaryMarketBackGround_Start

	//点心债旗舰店
	CataloguePage_Dimsum_Start = 32000,						
	CataloguePage_Dimsum_Web_Bochk_DimSum = 32001,		//中银香港
	//CataloguePage_Dimsum_Web_Start = 32100,			//预留
	//CataloguePage_Dimsum_Web_End = 32500,				//网页版点心债旗舰店，允许400家
	CataloguePage_Dimsum_End,							//CataloguePage_Dimsum_Web_Start
	CataloguePage_End,

	//弹出窗口
	CataloguePopup_Start = 50000,	
	CataloguePopup_QuoteChanges = 50001,				//报价变动	
	CataloguePopup_MiniQuote = 50002,					//行情小窗
	CataloguePopup_IrsTrendCurve = 50003,				//IRS趋势曲线
	CataloguePopup_IrsSon = 50004,						//IRS弹窗
	CataloguePopup_BondCalculator = 50005,				//债券价格试算
	//CataloguePopup_NewsAndInformation = 50006,		//新闻资讯
	CataloguePopup_Watchlist = 50007,					//我的关注
	CataloguePopup_SumscopeRemindAssistant = 50008,		//提醒助手
	CataloguePopup_FilterManager = 50009,				//筛选管理
	CataloguePopup_MessageCenter = 50010,				//消息中心
	CataloguePopup_ConvensionFactorCalculator = 50011,	//转换因子计算器 TF计算器
	CataloguePopup_RepurchaseCalculator = 50012,		//回购计算器
	CataloguePopup_MyScore = 50013,						//我的积分
	CataloguePopup_PrimaryMarket_All = 50014,			//一级旗舰店首页
	CataloguePopup_IrsComTrendCurve = 50015,				//IRS市场动向, 弃用该窗口
	CataloguePopup_MemberDetail = 50016,				//QB会员成长体系
	CataloguePopup_MiniSpread = 50017,					//spread报价
	CataloguePopup_LayoutBoard = 50018,					//行情板
	CataloguePopup_BestPrice = 50019,					//最优报价弹出窗
	CataloguePopup_Trades = 50020,						//实时成交
	CataloguePopup_IrsRateCurve = 50021,				//IRS收益率曲线
	CataloguePopup_IrsDeepQuote = 50022,				//IRS综合-深度行情
	CataloguePopup_IrsBestQuote = 50023,				//IRS综合-最优报价
	CataloguePopup_IrsComDealChart = 50024,				//IRS综合-成交行情
	CataloguePopup_IrsCompQuoteChart = 50025,			//IRS综合-价格曲线
	CataloguePopup_ABSCalculator = 50026,				//ABS计算器
	CataloguePopup_PanoramicChart = 50027,				//利率互换弹窗
	CataloguePopup_FilterManagerAttention = 50028,				//筛选管理--我的关注
	CataloguePopup_FilterManagerCondition = 50029,				//筛选管理--我的方案

	CataloguePopup_End,  //CataloguePopup_Start

	CataloguePage_WebAppStart = 77000,
	//IAS地址
	CataloguePage_WebApp_Ias_Start = 79950,
	CataloguePage_WebApp_Ias_End	= 80000,
	CataloguePage_WebAppEnd	= 80000,

	// 其他辅助页面 (现包括 QM帮助中心)
	CataloguePage_Other_Start,
	CataloguePage_Other_QMHelp = 88888,
	CataloguePage_Perf_Monitor = 88889,		// 性能监控
	CataloguePage_Other_End = 100000,
	CataloguePage_MAX,
	//----------------------------------------------------------------
};

//期权
const char s_pOptionInstitutionIdAlpha[] = "4028815c4c307f78014c30ec22940004";
const char s_pOptionInstitutionIdNanhua[] = "ff808181431eed020143b33e8b705b1b";
const char s_pOptionInstitutionIdXinhu[] = "ff808181441b532a01442419d1a27388";
const char s_pOptionInstitutionIdYinhe[] = "ff808181492d1b6601498465731d6b72";

//银行报价
//交通银行
const char s_pBankPriceInstitutionIdComm[] = "402880f034219aed013421d998bc1b50";
//兴业银行
const char s_pBankPriceInstitutionIdCib[] = "2a4622f4346a647001346a7c117f006b";

//一级
//民生银行
const char s_pPrimaryInstitutionIdCmbc[] = "402880f034219aed013421d9a2421b9b";
//平安银行
const char s_pPrimaryInstitutionIdPingAn[] = "ff808181359f49e601359f6dbb83031a";
//申万宏源
const char s_pPrimaryInstitutionIdSwhysc[] = "402880f034219aed0134219e10b00727";
//建设银行
const char s_pPrimaryInstitutionIdCcb[] = "402880f034219aed013421d996481b3f";
//联讯证券
const char s_pPrimaryInstitutionIdLianXunSec[] = "ff80818146a41f860146d7b0edca1df6";
//国开行北京
const char s_pPrimaryInstitutionIdCdb[] = "402880f034219aed013421d993771b27";
//宁波银行
const char s_pPrimaryInstitutionIdNbcb[] = "402880f034219aed0134219d4fbe0125";
//国利货币
const char s_pPrimaryInstitutionIdLianTpsitico[] = "1";
//北京农商行
const char s_pPrimaryInstitutionIdBjrcb[] = "402880f034219aed0134219d67ef01f5";
//太平洋资产
const char s_pCPICInvestInstitution[] = "402880f034219aed0134219e3f650875";
//招商证券
const char s_pPrimaryInstitutionIdCMS[] = "ff808181359f49e601359f6da6ad02e0";
//蓝石北京投资旗舰店
const char s_pPrimaryInstitutionIdLanShi[] = "3428a92f55550616015556db627d0083";
//中信建投旗舰店
const char s_pPrimaryInstitutionIdCSC[] = "402880f034219aed0134219dfd55069b";
//中融景诚
const char s_pPrimaryInstitutionIdVisionfunds[] = "ff80818141120c920141c9a8f27b03d0";
//国泰君安
const char s_pPrimaryInstitutionIdGuoTaiJunAn[] = "402880f034219aed0134219e0ae806fb";

//中银香港
const char s_pDimsumInstitutionIdBochk[] = "ff80818140587874014061d76b985f56";



//title string
LPCTSTR cstrTitle(QBCatalogue::ECataloguePage id);
//
QBCatalogue::ECataloguePage GetPrimaryPageTypeByInstitution(LPCSTR lpInstitution);

class CCatalogueBaseElement;

}


